<?php
	class view
	{
		private $_path = null, $_template = null, $_data = array();
	
		public function __construct($path, $name)
		{
			$this->_path		= $path;
			$this->_template	= $name;
		}
	
		public function layout($name)
		{
			$this->_template = $name;
		}
	
		public function assign($name, $value)
		{
			$this->_data[$name] = $value;
		}
		
		public function display()
		{
			extract($this->_data, EXTR_OVERWRITE);
			require($this->_path . $this->_template);
		}
	}